<!-- Created by henian.xu on 2018/11/5. -->

<template>
    <div class="banner">
        <div class="container">
            <div class="row no-spacing">
                <div class="col-12">客服热线: <a 
                    :href="`tel://${info.sy_kfrx}`" 
                    class="tc-main fs-big">{{ info.sy_kfrx }}</a></div>
                <div class="col-12">
                    <ul class="banner-list">
                        <li><span><i class="f-icon">&#xf2be;</i> <a :href="info.sy_sfxdldz">分销商登录</a></span></li>
                        <li><span><a :href="info.sy_gysdldz">供应商登录</a></span></li>
                        <li><span><a href="/register/reviewProgress">进度查询</a></span></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'Banner',
    data() {
        return {
            info: {
                // 首页_客服热线
                sy_kfrx: '',
                // 首页_分销商登录地址
                sy_sfxdldz: '',
                // 首页_供应商登录地址
                sy_gysdldz: '',
            },
            infoKey: 'sy_kfrx,sy_sfxdldz,sy_gysdldz',
        };
    },
    methods: {
        async getPortalInfoValue() {
            await this.$axios
                .get('/rpc/comm/pt/portalInfoConfig/getPortalInfoValue', {
                    keys: this.infoKey,
                })
                .then(json => {
                    const result = json.data.data;
                    this.info.sy_kfrx = result.sy_kfrx.text;
                    this.info.sy_sfxdldz = result.sy_sfxdldz.text;
                    this.info.sy_gysdldz = result.sy_gysdldz.text;
                });
        },
    },
    mounted() {
        this.getPortalInfoValue();
    },
};
</script>

<style lang="scss" scoped>
@import '~/assets/style/_index.scss';
.banner {
    min-height: 30px;
    line-height: 30px;
}
.banner-list {
    float: right;
    list-style: none;
    padding-left: 0;
    @include clearfix;
    > li {
        float: left;
        > span {
            padding: 0 $padding;
        }
        + li {
            > span {
                border-left: 1px solid $color-border;
            }
        }
    }
}
</style>
